package com.oa.admin.service.impl;

import com.joneying.common.annotation.CommonService;
import com.oa.admin.dto.EmpBenefitsRemindListDTO;
import com.oa.core.PageResult;
import com.oa.admin.entity.EmpBenefitsRemind;
import com.oa.admin.mapper.EmpBenefitsRemindMapper;
import com.oa.admin.service.IEmpBenefitsRemindService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.plugins.Page;
import java.util.List;

/**
 * <p>
 * 员工福利提醒 服务实现类
 * </p>
 *
 * @author syb123
 * @since 2019-01-22
 */
@Service
public class EmpBenefitsRemindServiceImpl extends ServiceImpl<EmpBenefitsRemindMapper, EmpBenefitsRemind> implements IEmpBenefitsRemindService {

    private final EmpBenefitsRemindMapper empBenefitsRemindMapper;

    @Autowired
    public EmpBenefitsRemindServiceImpl(EmpBenefitsRemindMapper empBenefitsRemindMapper) {
        this.empBenefitsRemindMapper = empBenefitsRemindMapper;
    }

    @Override
    @CommonService
    public PageResult<EmpBenefitsRemind> findList(EmpBenefitsRemindListDTO empBenefitsRemindListDTO) {
        Page page = empBenefitsRemindListDTO.getPage();
        return new PageResult<EmpBenefitsRemind>(empBenefitsRemindMapper.findList(page, empBenefitsRemindListDTO), page);
    }

    /**
    * 根据id查询
    */
    @Override
    @CommonService
    public EmpBenefitsRemind findEmpBenefitsRemindById(String id){
        return empBenefitsRemindMapper.findById(id);
    }
}
